<!DOCTYPE html
  PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns:MSHelp="http://www.microsoft.com/MSHelp/" lang="en-us" xml:lang="en-us"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<meta name="DC.Type" content="reference">
<meta name="DC.Title" content="task_list Class">
<meta name="DC.subject" content="task_list Class">
<meta name="keywords" content="task_list Class">
<meta name="DC.Relation" scheme="URI" content="../../reference/task_scheduler.htm">
<meta name="DC.Relation" scheme="URI" content="../synchronization.htm">
<meta name="DC.Format" content="XHTML">
<meta name="DC.Identifier" content="task_list_cls">
<meta name="DC.Language" content="en-US">
<link rel="stylesheet" type="text/css" href="../../intel_css_styles.css">
<title>task_list Class</title>
</head>
<body id="task_list_cls">
 <!-- ==============(Start:NavScript)================= -->
 <script src="..\..\NavScript.js" language="JavaScript1.2" type="text/javascript"></script>
 <script language="JavaScript1.2" type="text/javascript">WriteNavLink(2);</script>
 <!-- ==============(End:NavScript)================= -->
<a name="task_list_cls"><!-- --></a>

 
  <h1 class="topictitle1">task_list Class</h1>
 
   
  <div> 
	 <div class="section"><h2 class="sectiontitle">Summary</h2> 
		 
		<p>List of 
		  <em>task</em> objects. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Syntax</h2> 
		 
		<pre>class task_list;</pre> 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Header</h2> 
		 
		<pre>#include "tbb/task.h"</pre> 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Description</h2> 
		 
		<p>A 
		  <samp class="codeph">task_list</samp> is a list of references to<em> task
			 objects</em>. The purpose of 
		  <samp class="codeph">task_list</samp> is to allow a 
		  <em>task</em> to create a list of tasks and spawn them all at once via
		  the method 
		  <samp class="codeph">task::spawn(task_list&amp;)</samp>, as described in Section
		  static void spawn ( task_list&amp; list ). 
		</p>
 
		<p>A 
		  <em>task</em> can belong to at most one 
		  <samp class="codeph">task_list</samp> at a time, and on that 
		  <samp class="codeph">task_list</samp> at most once. A 
		  <em>task</em> that has been spawned, but not started running, must not
		  belong to a 
		  <samp class="codeph">task_list</samp>. A 
		  <samp class="codeph">task_list</samp> cannot be copy-constructed or assigned. 
		</p>
 
	 </div>
 
	 <div class="section"><h2 class="sectiontitle">Members</h2> 
		 
		<pre>namespace tbb {
            &nbsp;&nbsp; class task_list {
            &nbsp;&nbsp;&nbsp; public:
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; task_list();
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ~task_list();
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bool empty() const;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void push_back( task&amp; task );
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; task&amp; pop_front();
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void clear();
            &nbsp;&nbsp;&nbsp; };
            } </pre> 
		
<div class="tablenoborder"><table cellpadding="4" summary="" frame="border" border="1" cellspacing="0" rules="all"><span class="tabledesc">The following table provides additional information on the
			 members of this template class. 
		  </span><thead align="left"> 
				<tr> 
				  <th class="cellrowborder" valign="top" width="33.89830508474576%" id="d115689e113">Member 
				  </th>
 
				  <th class="cellrowborder" valign="top" width="66.10169491525423%" id="d115689e116">Description 
				  </th>
 
				</tr>
</thead>
 
			 <tbody> 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">task_list()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p>Constructs an empty list. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">~task_list()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p>Destroys the list. Does not destroy the task objects. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">bool empty() const</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p><strong>Returns</strong>: True if list is empty; false otherwise. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">push_back( task&amp; task
						)</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p>Inserts a reference to 
						<em>task</em> at back of the list. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">task&amp; task
						pop_front()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p>Removes a 
						<em>task</em> reference from front of list. 
					 </p>
 
					 <p><strong>Returns</strong>: The reference that was removed. 
					 </p>
 
				  </td>
 
				</tr>
 
				<tr> 
				  <td class="cellrowborder" valign="top" width="33.89830508474576%" headers="d115689e113 "><span class="keyword">void clear()</span> 
				  </td>
 
				  <td class="cellrowborder" valign="top" width="66.10169491525423%" headers="d115689e116 "> 
					 <p>Removes all 
						<em>task</em> references from the list. Does not destroy the
						task objects. 
					 </p>
 
				  </td>
 
				</tr>
 
		
			 </tbody>
 
		  </table>
</div>
 
	 </div>
 
  </div>
 
  
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong>&nbsp;<a href="../../reference/task_scheduler.htm">Task Scheduler</a></div>
</div>
<div class="See Also">
<h2>See Also</h2>
<div class="linklist">
<div><a href="../synchronization.htm">Synchronization, static void spawn ( task_list&amp; list ) 
		  </a></div></div>
</div>

</body>
</html>
